#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
int main()
{
	int N;
	int count = 0;
	scanf("%d", &N);
	for (int j = 2; j<N; j++)
	{
		int flag = 1;
		for (int i = 2; i <= sqrt(j); i++)
		{
			if (j%i == 0)
			{
				flag = 0;
			}
		}
		if (flag)
			count++;
	}
	printf("%d", count);
	return 0;
}